package com.zf.yichat.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;

@Table(name = "user_join_chatroom")
public class UserJoinChatroom implements Serializable {

    // 待审核
    public static final String STATUS_AUDIT = "0";
    // 审核通过
    public static final String STATUS_APPROVED = "1";
    // 拒绝后仍可申请
    public static final String STATUS_REJECTION = "2";
    // 拒绝后不可申请
    public static final String STATUS_REJECTED = "3";

    @Id
    private Integer id;

    @Column(name = "user_id")
    private Long userId;

    @Column(name = "chatroom_id")
    private String chatroomId;

    @Column(name = "create_time")
    private Date createTime;

    private static final long serialVersionUID = 1L;

    public UserJoinChatroom(Integer id, Long userId, String chatroomId, Date createTime) {
        this.id = id;
        this.userId = userId;
        this.chatroomId = chatroomId;
        this.createTime = createTime;
    }

    public UserJoinChatroom() {
        super();
    }

    /**
     * @return id
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * @return user_id
     */
    public Long getUserId() {
        return userId;
    }

    /**
     * @param userId
     */
    public void setUserId(Long userId) {
        this.userId = userId;
    }

    /**
     * @return chatroom_id
     */
    public String getChatroomId() {
        return chatroomId;
    }

    /**
     * @param chatroomId
     */
    public void setChatroomId(String chatroomId) {
        this.chatroomId = chatroomId == null ? null : chatroomId.trim();
    }

    /**
     * @return create_time
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * @param createTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}